<!--���д���-->
function runCode(id){
	var obj = document.getElementById(id); 
	var TestWin=open('');  
	TestWin.opener = null;
	TestWin.document.write(obj.value); 
	TestWin.document.close(); 
}
<!--�ص�����-->
function backTop(){
	$(function(){
		// hide #back-top first
		$("#back-top").hide();
		// fade in #back-top
		$(function () {
			$(window).scroll(function () {
				if ($(this).scrollTop() > 500) {
					$('#back-top').fadeIn();
				} else {
					$('#back-top').fadeOut();
				}
			});
			// scroll body to 0px on click
			$('#back-top a').click(function () {
				$('body,html').animate({
					scrollTop: 0
				}, 800);
				return false;
			});
		});
	});
}
backTop();
<!--ͼƬ����-->
function showAds(){
	$(function(){
		var prefix="http://www.cnblogs.com/images/cnblogs_com/lhb25/ads/";
		var cfgs=[
			{width:480,height:60,name:"480-60-1.gif"},
			{width:480,height:60,name:"480-60-1.gif"},
			{width:480,height:60,name:"480-60-1.gif"},
			{width:480,height:60,name:"480-60-1.gif"},
			{width:480,height:60,name:"480-60-1.gif"},
			{width:480,height:60,name:"480-60-2.gif"},
			{width:480,height:60,name:"480-60-2.gif"},
			{width:480,height:60,name:"480-60-2.gif"},
			{width:480,height:60,name:"480-60-2.gif"},
			{width:480,height:60,name:"480-60-2.gif"}
		];
		var cfg=cfgs[0];
		$("body").append("<div id=\"hoverAds\" style=\"display:none\"><a href=\"http://ad.tap.cn/ad/tap/\" target=\"_blank\"><img id=\"adsImg\" src=\"\" border=\"0\"/></a></div>");
		var ads=$("#hoverAds");
		$(".postBody img").hover(
		function(event){
			var cur=$(this);
			var cur_h=cur.height();
			if(cur_h<200)
				return;
			var cur_w=cur.width();
			if(cur_w<500)
				return;
			var os=cur.offset();
			var cur_t=os.top;
			var cur_l=os.left;
			cfg=cfgs[Math.floor(Math.random()*10)];
			ads.css({
				"top":(cur_t+cur_h-cfg.height)+this.clientTop+"px",
				"left":cur_l+"px",
				"width":cfg.width+"px",
				"height":cfg.height,
				"opacity":"0.9",
				"position":"absolute",
				"margin-left":(cur_w-cfg.width)/2+this.clientLeft+"px"
			});
			var ad_img=$("#adsImg");
			ad_img.attr("src",prefix+cfg.name);
			ads.fadeIn("slow");
		},
		function(event){
			if(event.relatedTarget.id=="adsImg")
				return;
			ads.hide();
		});
	});
}
showAds();